package me.zk.practice1.s;

/**
 * @author zhangkai
 * @date 2023/7/15 11:43
 */
public class LS_Offer_11 {
    public int minArray(int[] numbers) {
        int l =0, r = numbers.length-1;
        while (l<r) {
            int m = (l+r)/2;
            if (numbers[m]>numbers[r]) {
                l = m+1;
            } else if (numbers[m]<numbers[r]){
                r = m-1;
            } else {
                r--;
            }

        }
        return numbers[l];
    }
}
